%%
%% getstart.tex -- Flight Gear documentation: The FlightGear Manual
%% Chapter file
%%
%% Written by Michael Basler, started September 1998.
%%
%% Copyright (C) 2002 Michael Basler
%%
%%
%% This program is free software; you can redistribute it and/or
%% modify it under the terms of the GNU General Public License as
%% published by the Free Software Foundation; either version 2 of the
%% License, or (at your option) any later version.
%%
%% This program is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
%% General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with this program; if not, write to the Free Software
%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%%
%% $Id: features.tex,v 0.6 2002/09/09 Stuart

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\IfLanguageName{french}{
  \chapter{Fonctionnalit\'{e}s}
}{
  % default: English
  \translatorStart
  \chapter{Features}
  \translatorEnd
}
\label{features}\label{Fonctionnalit\'{e}s}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\IfLanguageName{french}{
  \FlightGear{} contient de nombreuses fonctonnalit\'{e}s sp\'{e}cifiques, certaines d'entre elles n'\'{e}tant pas
  directement apparentes pour le nouvel utilisateur. Ce chapitre d\'{e}crit comment activer et utiliser quelques
  unes des fonctionnalit\'{e}s les plus avanc\'{e}es.

  De nombreuses fonctionnalit\'{e}s sont en d\'{e}veloppement permanent, donc l'information pr\'{e}sente dans le manuel
  peut ne pas \^{e}tre compl\`{e}tement \`{a} jour.
  For the very latest information (and new features), see the \FlightGear{} Wiki, available from
  \web{http://wiki.flightgear.org/}
}{
  % default: English
  \translatorStart
  \FlightGear{} contains many special features, some of which are not obvious to the new user. This section
  describes how to enable and make use of some of the more advanced features.
  
  Many of the features are under constant development, so the information here may not be completely up-to-date.
  For the very latest information (and new features), see the \FlightGear{} Wiki, available from
  \web{http://wiki.flightgear.org/}
  \translatorEnd
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\IfLanguageName{french}{
  \section{Multijoueurs}\index{Multijoueurs}\label{multijoueurs}
}{
  % default: English
  \translatorStart
  \section{Multiplayer}\index{Multiplayer}
  \translatorEnd
}
\label{multiplayer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\IfLanguageName{french}{
  \FlightGear{} offre un environnement multijoueurs, vous permettant de partager l'air avec d'autres amateurs de simulation de vol.
  Pour plus de d\'{e}tail sur les serveurs et pour voir qui est en ligne (et o\`{u} ils volent), allez jeter un \oe{}il \`{a}
  l'excellente carte multijoueurs, disponible \`{a} l'adresse :
}{
  % default: English
  \translatorStart
  \FlightGear{} supports a multiplayer environment, allowing you to share the air with other flight-simmers.
  For server details and to see who is online (and where they are flying), have a look at the excellent
  multiplayer map, available from:
  \translatorEnd
}

\noindent
\web{http://mpmap02.flightgear.org}

\IfLanguageName{french}{
  Cliquez sur l'onglet `server' pour voir une liste des serveurs multijoueurs.
}{
  % default: English
  \translatorStart
  Click on the `server' tab to see a list of multiplayer servers.
  \translatorEnd
}

\IfLanguageName{french}{
  \subsection{D\'{e}marrage rapide}

  Vous pouvez vous connecter \`{a} l'environnement multijoueurs (MP) \`{a} partir de la bo\^{\i}te de dialogue du menu
  `Multijoueurs'. Choisissez simplement le serveur le plus proche de chez vous \`{a} partir de la liste, entrez un indicatif
  (qui sera vu par les autres joueurs) et cliquez sur ''Connect''.

  Pour affichez une liste des autres pilotes dans la zone, s\'{e}lectionnez Pilot List \`{a} partir du menu `Multijoueurs'.

  Sous les serveurs multijoueurs standard sont interconnect\'{e}s, donc il n'est pas n\'{e}cessaire d'\^{e}tre\\connect\'{e} sur le
  m\^{e}me serveur que les gens avec qui vous volez.
}{
  % default: English
  \translatorStart
  \subsection{Quick Start}

  You can connect to the MP environment from the MP Settings dialog under the Multiplayer menu. Simply select the
  server closest to you from the list, enter a callsign (which will be seen by other players), and click ''Connect''.
  
  To see a list of other pilots are in the area, select Pilot List from the Multiplayer menu.
  
  All the standard MP servers are interconnected, so there is no need to be on the same server as people you are flying with.
  \translatorEnd
}

\IfLanguageName{french}{
  \subsection{Autres m\'{e}thodes}

  Si vous vous connectez \`{a} un serveur non standard, ou si la m\'{e}thode \c{c}i-dessus ne fonctionne pas,
  vous pouvez aussi vous connecter en utilisant les m\'{e}thodes \c{c}i-dessous.
}{
  % default: English
  \translatorStart
  \subsection{Other Methods}

  If you are connecting to a non-standard server, or the above method does not work, you can also connect
  using the methods below.
  \translatorEnd
}

\IfLanguageName{french}{
  \subsubsection{Utilisation du lanceur FlightGear}

  L'\'{e}cran final du lanceur FlightGear comporte une section pour les fonctions multijoueurs.
  Choisissez simplement la case \`{a} cocher, entrez le nom d'h\^{o}te et le num\'{e}ro de port
  que vous avez not\'{e} \c{c}i-dessus et choisissez un indicatif pour vous identifier.
  Votre indicatif peut comporter jusqu'\'{a} 7 caract\`{e}res.
  Vous devez \'{e}galement cocher la case AI models sous Features pour rendre les autres a\'{e}ronefs visibles.
}{
  % default: English
  \translatorStart
  \subsubsection{Using the FlightGear Launcher}

  The final screen of the FlightGear Launcher has a section for Multiplayer.
  Simply select the checkbox, enter the hostname and port
  number you noted above and choose a callsign to identify yourself.
  Your callsign can be up to 7 characters in length.
  You must also check The AI models checkbox under Features to make other aircraft visible.
  \translatorEnd
}

\IfLanguageName{french}{
  \subsubsection{Utilisation de la ligne de commande}

  Les arguments de base \`{a} passer \`{a} fgfs pour le mode multijoueurs sont les suivants :
}{
  % default: English
  \translatorStart
  \subsubsection{Using the Command Line}

  The basic arguments to pass to fgfs for multiplayer are these:
  \translatorEnd
}

\begin{verbatim}
--multiplay=out,10,<server>,<portnumber>
--multiplay=in,10,<client>,<portnumber>
--callsign=<anything>
--enable-ai-models
\end{verbatim}

\IfLanguageName{french}{
  O\`{u}
  \begin{enumerate}
  \item <portnumber> est le num\'{e}ro de port TCP du serveur, par exemple 5000.
  \item <server> est le nom du serveur multijoueurs, par exemple mpserver01.flightgear.org.
  \item <client> est le nom de votre ordinateur, ou l'adresse IP de l'interface r\'{e}seau utilis\'{e}e
  par FG pour se connecter au serveur, m\^{e}me s'il c'est une adresse locale du type 192.168, comme 192.168.0.1
  \item <callsign> est l'indicatif pour vous identifier, jusqu'\`{a} 7 caract\`{e}res, par exemple F-FGFS.
  \end{enumerate}

  Une fois que le simulateur est lanc\'{e}, vous devriez vous voir appara\^{\i}tre sur la carte. Si ce n'est pas le cas,
  v\'{e}rifiez si la console contient des messages d'erreurs et voyez la section R\'{e}solution des probl\`{e}mes \c{c}i-dessous.
}{
  % default: English
  \translatorStart
  Where
  \begin{enumerate}
  \item <portnumber> is the TCP port number of the server e.g. 5000.
  \item <server> is the name of the multiplayer server e.g. mpserver01.flightgear.org.
  \item <client> is the name of your computer, or the IP address ip address of the network interface being
  used by FG to connect to the server - even if that's a local 192.168 type address. e.g. 192.168.0.1
  \item <callsign> is the call sign to identify yourself, up to 7 characters, e.g. N-FGFS.
  \end{enumerate}
  
  Once the simulator has loaded, you should see yourself displayed on the map. If you don't, check the
  console for error messages and see the Troubleshooting section below.
  \translatorEnd
}

\IfLanguageName{french}{
  \subsection{R\'{e}solution des probl\`{e}mes}

  Pour faire fonctionner le mode multijoueurs, nous avons besoin d'information sur l'adresse IP de notre ordinateur et sa capacit\'{e}
  \`{a} communiquer avec le serveur. L'obtention de cette information d\'{e}pend de votre configuration et est d\'{e}crite \c{c}i-dessous.
}{
  % default: English
  \translatorStart
  \subsection{Troubleshooting}

  To get multiplayer to work, we need information about the IP address of our computer and the
  ability to communicate with the server. How to get this information depends on your configuration and is described below.
  \translatorEnd
}

\IfLanguageName{french}{
  \subsubsection{Ceux qui utilisent un modem USB pour se connecter \`{a} Internet}

  Tout d'abord, vous devez conna\^{\i}tre l'adresse IP de l'interface r\'{e}seau sur laquelle vous allez utiliser le mode multijoueurs.
  Si votre connexion Internet est r\'{e}alis\'{e}e via un modem ADSL qui est directement raccord\'{e} \`{a} votre ordinateur par le biais
  d'une connexion USB, vous devriez \^{e}tre capable de trouver votre adresse IP en visitant le site http://www.whatismyip.com. Veuillez
  noter que cette adresse peut parfaitement varier de temps en temps. Si le mode multijoueurs ne fonctionne plus, v\'{e}rifiez ce point
  en priorit\'{e}.
}{
  % default: English
  \translatorStart
  \subsubsection{Those using a USB modem to connect to the Internet}

  Firstly, you will need to know the IP address of the network you are going to be running FG multiplayer over.
  If your Internet connection is via an ADSL modem that plugs directly into your computer with a USB connection, you
  should be able to find your IP address by visiting http://www.whatismyip.com. Please note that this address may very well
  change every now and again - if MP stops working, check this first.
  \translatorEnd
}

% default: English
\translatorStart
\subsubsection{Those using some kind of Ethernet router to connect to the Internet}

Otherwise, your connection is likely via some kind of router that connects to your computer via an RJ-45, or "Ethernet" connector
(similar shape to most Western telephone plugs), or by a wireless link. You need to find the IP address of that network interface.

Under Linux, this can be found by logging in as root and typing "ifconfig". You may find more than one interface listed,
beginning with "lo" - ignore that one. You should have something like "eth0" or "wlan0" also listed - look through this block
of text for "inet addr". This will be followed directly by the number you're looking for, e.g. "inet addr:192.168.0.150"

Under Windows XP, click start, run, and type "cmd". In the terminal window which appears, type "ipconfig"
This should show you your IP address - note it down.

With Windows 98, click start, run, and type "winipcfg" to get information about your IP address.

\subsubsection{If It Still Doesn't Work}

You MUST give your local, behind-the-router IP address for MultiPlayer to work. Trust me on this one!

You should check that your firewall is not causing problems - either turn it off temporarily or add an exception
to allow incoming connections on port 5000.

If it's still just not working for you, ask nicely on the FlightGear IRC channel and someone should be able to assist.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Aircraft Carrier}\index{Aircraft Carrier}\label{carrier}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\FlightGear{} supports carrier operations on the Nimitz, (located near San Fransisco), Vinson, San Antonio, Foch, and Eisenhower.
The carriers are equipped with working catapult, arrester wires, elevators, TACAN and FLOLS.

To enable the carrier, you must edit your preferences.xml file in \$FG\_ROOT using a text editor (e.g. Notepad
under Windows). Search for the word ``nimitz''. You ought to find something that looks like this;

\begin{verbatim}
<!--<scenario>nimitz_demo</scenario>-->
\end{verbatim}

You should remove the ``comment'' marks so that it looks like this;


\begin{verbatim}
<scenario>nimitz_demo</scenario>
\end{verbatim}

Also ensure that the line above that referring to ai being enabled is set to "true"

Save the file and quit the text editor.

\subsection{Starting on the Carrier}

You are now ready to start FlightGear. To position your aircraft on the carrier at startup,
use the following command line options:

\begin{verbatim}
--carrier=Nimitz --aircraft=seahawk
\end{verbatim}

Please note the uppercase ``N' in ``Nimitz'.

If you are using the Windows or OS X launcher to run FG, you should find a text entry box in the gui that
allows you to specify command line options, add the above options there.

Note that several FG aircraft are carrier capable, but the seahawk is possibly the easiest to fly to begin with.

\subsection{Launching from the Catapult}

Once FlightGear has started, you should ensure that the parking brakes are off and press and hold ``L'' to
engage the launchbar. You must hold down ``L'' until the launch bar has engaged.
You should notice the aircraft being pulled into alignment with the catapult and see
the strops appear and hold down the aircraft.  This will only happen if your aircraft is
close enough to the correct spot on the catapult; as a rough guide, for the default
parking position the seahawk's nose should be roughly level with the deck observation bubble.

To get the carrier into as good a position as possible for launch, select the ``ATC/AI'' menu, then
check the ``Turn into wind'' box under the ``AI Carrier'' section. You should now notice the carrier
begin to pick up speed and turn into the wind, and naturally the deck may tilt somewhat as it turns.
You should wait for this maneuver to finish and the deck to return to level before moving on to the next stage.

Being attached to the catapult, you should spool up the engines to full power, ensure the brakes are off
and that all flight controls are in a suitable position for launch (stick held right back with the seahawk.)
When ready, press ``C'' to release the catapult. Your aircraft will be hurled forward off the deck, and
you should be able to raise the undercarriage and climb slowly away, being careful to avoid stalling.

\subsection{Finding the Carrier - TACAN}

Actually finding the carrier in a vast expanse of open water can be very difficult, especially if visibility
is poor. To assist with this task, Nimitz is equipped with TACAN, which allows a suitably-equipped
aircraft (including the Seahawk) to obtain a range and bearing to the carrier. First, you must set
the appropriate TACAN channel, 029Y in this case, in the radios dialogue (ctrl-r or choose
Equipment/Radio Settings from the FG menubar). You should, if within range, notice the DME instrument
show your distance from the carrier, and the ADF instrument (next to the DME in the seahawk) should
indicate a bearing to the carrier. Turn to the indicated heading and you should see the DME dial
indicate your closing in on the carrier.

\subsection{Landing on the Carrier}

This is the most difficult part of the operation, as in real life. You might well find Andy Ross' tutorial on
operating the A4 Skyhawk useful. It is available from here:

\noindent
\web{http://wiki.flightgear.org/A-4F\_Skyhawk\_Operations\_Manual}

Once you have used the TACAN to locate the carrier, you must
line up with the rear of the flight deck. As this part of the deck is at an angle to the course of the vessel,
you may need to correct your alignment often. Ensure that the aircraft is in the correct configuration for
approach (the Help/Aircraft Help menu should contain useful data for your aircraft) and that the gear and
the arrestor hook are down.

As you approach you should see, on the left hand side of the deck, a set of brightly coloured lights - called
the Fresnel Lens Optical landing System (FLOLS). This indicates your position on the landing glideslope.
You will see a horizontal row of green lights, and when approximately on the glideslope, an orange light
(known in some circles as the ``meatball'') approximately in line with the green lights. When approaching
correctly, the meatball appears in line with the green lights. If you are high it is above, and when low
it is below. If you are very low the meatball turns red. If you fly to keep the meatball aligned you
should catch number 3 wire.

Carrier landings are often described as ``controlled crashes'' and you shouldn't waste your time attempting
to flare and place the aircraft gently on the deck like you would with a conventional landing - ensuring that
you catch the wires is the main thing.

Immediately your wheels touch the deck, you should open the throttles to full power, in case you have
missed the wires and need to ``go around'' again; the wires will hold the aircraft if you have caught them,
even at full power.

If you wish, you can then raise the elevators from the ATC/AI menu, taxi onto one of the elevators,
lower it (uncheck the box on the menu) and taxi off into the hangar.

Don't be discouraged if you don't succeed at first - it's not an easy maneuver to master. If after a little
practice you find the Seahawk too easy, you could move on to the Seafire for more of a challenge!


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Atlas\label{Atlas}}\index{Atlas}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Atlas is a "moving map" application for FlightGear. It displays the aircraft in relation to the terrain below,
along with airports, navigation aids and radio frequencies.

Further details can be found on the Atlas website:

\noindent
\web{http://atlas.sourceforge.net}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Multiple Displays}\index{Multiple Displays}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\FlightGear{} supports multiple displays. Using some straightforward
 XML, you can configure multiple "slave cameras" that are offset from
the main view, so you can use multiple monitors to display a
single view of the simulator. For example, you can have one display
showing the view straight ahead, while two additional displays show
the view to either side.

Information on configuring multiple displays can be found in the
README.multiscreen file in the docs directory of your \FlightGear{}
installation.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Multiple Computer}\index{Multiple Displays}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\FlightGear{} allows you to connect multiple instances of the program
using the very flexible I/O subsystem, and display completely different views
 and controls on different computers. This can be used in combination
 with the Multiple Display support to create a more sophisticated environment
 with separate cockpit panel displays and even a separate control
station allowing an instructor to fail instruments, change the weather etc.

An example of this is the 747 cockpit project.

\noindent
\web{http://www.flightgear.org/Projects/747-JW/}

\subsection{Setup}

Each instance of \FlightGear{} can support a single display. Due to the
complexity of the FDM and graphics, \FlightGear{} is very processor-intensive,
so running multiple instances of \FlightGear{} on a single machine is not
recommended.

You will therefore need a computer for each view of the simulation you wish
to display, including the panel. The computers obviously must be networked
and for simplicity should be on the same subnet.

One computer is designated as the master. This computer will run the FDM and
be connected to controls such as yokes, joysticks and pedals. As the machine is
running the FDM, it usually only displays a simple view, typically the main
panel, to maximize performance.

All other computers are designated as slaves. They are purely used for display
purposes and receive FDM information from the master.

\subsection{Basic Configuration}

Creating a basic configuration for multiple displays is straightforward. The
master computer needs to broadcast the FDM and control information to the slaves.
This is done using the following command line options:

\begin{verbatim}
--native-fdm=socket,out,60,,5505,udp
--native-ctrls=socket,out,60,,5506,udp
\end{verbatim}

The slave computers need to listen for the information, and also need to have
their own FDMs switched off:

\begin{verbatim}
--native-fdm=socket,in,60,,5505,udp
--native-ctrls=socket,in,60,,5506,udp
--fdm=null
\end{verbatim}

\subsection{Advanced Configuration}

The options listed above will simply show the same view on both machines. You will probably also want to set the
following command-line options on both master and slave computers.

\begin{verbatim}
--enable-game-mode  (full screen for glut systems)
--enable-full-screen (full screen for sdl or windows)
--prop:/sim/menubar/visibility=false (hide menu bar)
--prop:/sim/ai/enabled=false (disable AI ATC)
--prop:/sim/ai-traffic/enabled=false (disable AI planes)
--prop:/sim/rendering/bump-mapping=false
\end{verbatim}

If using the master computer to display a panel only, you may wish to create a full-screen panel for the
aircraft you wish to fly (one is already available for the Cessna 172), and use the following options.

\begin{verbatim}
--prop:/sim/rendering/draw-otw=false (only render the panel)
--enable-panel
\end{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Recording and Playback}\index{Playback}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

As well as the Instant Replay feature within the simulator, you can record your
flight for later analysis or replay using the I/O system.  Technical details of
how to record specific FDM information can be found in the
\$FG\_ROOT/protocol/README.protocol file.

To record a flight, use the following command line options:

\begin{verbatim}
--generic=file,out,20,flight.out,playback
\end{verbatim}

This will record the FDM state at 20Hz (20 times per second), using the playback
protocol and write it to a file flight.out.

To play it back later, use the following command line options:

\begin{verbatim}
--generic=file,in,20,flight.out,playback
--fdm=external
\end{verbatim}

The playback.xml protocol file does not include information such as plane type,
time of day, so you should use the same set of command line options as you
did when recording.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Text to Speech with Festival}\index{Text To Speech}
\label{TTS}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\FlightGear{} supports Text To Speech (TTS) for ATC and tutorial messages through the festival TTS
engine (\web{http://www.cstr.ed.ac.uk/projects/festival/}). This is available on many Linux distros,
and can also be installed easily on a Cygwin Windows system. At time of writing, support on other platforms is unknown.

\subsection{Installing the Festival system}

\begin{enumerate}
\item Install festival from \web{http://www.cstr.ed.ac.uk/projects/festival/}

\item Check if Festival works. Festival provides a direct console interface. Only the relevant lines are
shown here. Note the parentheses!

\begin{verbatim}
$ festival
festival> (SayText "FlightGear")
festival> (quit)
\end{verbatim}

\item Check if MBROLA is installed, or download it from here:

\web{http://tcts.fpms.ac.be/synthesis/mbrola/}

See under "Downloads"m "MBROLA binary and voices"
(link at the bottom; hard to find). Choose the binary for your platform. Unfortunately, there's no
source code available. If you don't like that, then you can skip the whole MBROLA setup.
But then you can't use the more realistic voices. See below for details of more voices.
Run MBROLA and marvel at the help screen. That's just to check if it's in the path and executable.

\begin{verbatim}
$ mbrola -h
\end{verbatim}
\end{enumerate}

\subsection{Running FlightGear with Voice Support}

First start the festival server:

\begin{verbatim}
$ festival --server
\end{verbatim}

Now, start \FlightGear{} with voice support enabled. This is set through the

/sim/sound/voices/enabled property. You can do this through the command line as follows.

\begin{verbatim}
$ fgfs --aircraft=j3cub \
       --airport=KSQL \
       --prop:/sim/sound/voices/enabled=true
\end{verbatim}

Of course, you can put this option into your personal configuration file.
This doesn't mean that you then always have to use FlightGear together with Festival.
You'll just get a few error messages in the terminal window, but that's it. You cannot enable
the voice subsystem when FlightGear is running.

To test it is all working, contact the KSFO ATC using the ' key. You should hear "your"
voice first (and see the text in yellow color on top of the screen), then you should hear
ATC answer with a different voice (and see it in light-green color).

You can edit the voice parameters in the preferences.xml file, and select different screen colors
and voice assignments in \$FG\_ROOT/Nasal/voice.nas. The messages aren't written to the
respective /sim/sound/voices/voice[*]/text properties directly, but rather to aliases

/sim/sound/voices/{atc,approach,ground,pilot,ai-plane}.

\subsection{Troubleshooting}

On some Linux distros, festival access is restricted, and you will get message like the following.

\begin{verbatim}
client(1) Tue Feb 21 13:29:46 2006 : \
  rejected from localhost.localdomain
not in access list
\end{verbatim}

Details on this can be found from:

\web{http://www.cstr.ed.ac.uk/projects/festival/manual/festival\_28.html\#SEC130}.

You can disable access restrictions from localhost and localhost.localdomain by adding
the following to a .festivalrc file in \$HOME:
\begin{verbatim}
(set! server_access_list '("localhost"))
(set! server_access_list '("localhost.localdomain"))
\end{verbatim}

Or, you can just disable the access list altogether:

\begin{verbatim}
(set! server_access_list nil)
\end{verbatim}

This will allow connections from anywhere, but should be OK if your machine is behind a
firewall.

\subsection{Installing more voices}

I'm afraid this is a bit tedious. You can skip it if you are happy with the default voice.
First find the Festival data directory. All Festival data goes to a common file tree,
like in FlightGear. This can be /usr/local/share/festival/ on Unices. We'll call that
directory \$FESTIVAL for now.

\begin{enumerate}
\item Check which voices are available. You can test them by prepending "voice\_":

\begin{verbatim}
$ festival
festival> (print (mapcar (lambda (pair) (car pair)) \
                                    voice-locations))
(kal_diphone rab_diphone don_diphone us1_mbrola \
                   us2_mbrola us3_mbrola en1_mbrola)
nil
festival> (voice_us3_mbrola)
festival> (SayText "I've got a nice voice.")
festival> (quit)
\end{verbatim}

\item Festival voices and MBROLA wrappers can be downloaded here:

\web{http://festvox.org/packed/festival/1.95/}

The don\_diphone voice is not the best, but it is comparatively small and well suited for ai-planes.
If you install it, it should end up as directory

\$FESTIVAL/voices/english/don\_diphone/.
You also need to install festlex\_OALD.tar.gz for it as \$FESTIVAL/dicts/oald/ and
run the Makefile in this directory.\\(You may have to add \texttt{-$ $-heap 10000000} to the
festival command arguments in the Makefile.)

\item Quite good voices are "us2\_mbrola", "us3\_mbrola", and "en1\_mbrola". For these you need to
install MBROLA (see above) as well as these wrappers:\\festvox\_us2.tar.gz, festvox\_us3.tar.gz,
and festvox\_en1.tar.gz. They create directories \$FESTIVAL/voices/english/us2\_mbrola/ etc.
The voice data, however, has to be downloaded separately from another site:

\item MBROLA voices can be downloaded from the MBROLA download page (see above).
You want the voices labeled "us2" and "us3". Unpack them in the directories that
the wrappers have created: \$FESTIVAL/voices/english/us2\_mbrola/ and likewise for "us3" and "en1".

\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Air-Air Refuelling}\label{aar}
  \index{Air-Air Refuelling}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

As the name suggests, Air-Air Refueling (AAR) involves refueling an aircraft
(typically a short-range jet fighter) from a tanker aircraft by flying in close
formation. There are two types of refueling system supported. The KC135-E tanker
has a boom that connects to a receiver on the refueling aircraft. The smaller
KA6-D deploys a hose, into which the refueling aircraft inserts a probe.

A number of aircraft support AAR, including the T-38, Lightning, A-4F, Vulcan,
Victor (which can also act as a tanker) and A-6E. You can tell if a particular
aircraft support AAR by looking at the AI/ATC menu. If the ``Tanker'' menu item
is enabled, the aircraft support AAR.

\subsection{Setup}

To set up AAR, simply start FlightGear with an AAR-enabled aircraft, take-off
and climb to 15,000ft. Once cruising at this altitude, select AI/ATC->Tanker,
and select ``Request'', which will spawn a new tanker in clear air at
approximately your altitude.

FlightGear will report the altitude, speed, and TACAN identifier of the tanker.
Program your TACAN with the TACAN identifier reported by the tanker (from the
Equipment->Radio Settings dialog, or your cockpit controls). Depending on your
aircraft, the tanker may also appear on your radar. If you require more help to
find the tanker, you can select ``Get Position'' to be told the tanker
location relative to yourself

Turn to an appropriate heading, guided by the TACAN bearing (you should
try a "leading" approach to close in on the tanker) and look for the
tanker on the radar or nav. screen.  Around 5nm away, you should reduce
your speed to around 20kts faster than the tanker - a "slow overtake".  The
KC135 will be visible from about 10nm, the KA6-D, being smaller, just over 1 nm.
If you find yourself overshootng, deploy your airbrakes.

Close to within 50ft of the tanker (don't get too close, or you may collide with
the tanker itself).  You should see indication in
the cockpit that you are receiving fuel - there is a green light in the
A4 fuel gauge, and you should see the indicated tank load increase.

Once your tanks are full, or you have taken as much fuel as you wish,
close the throttle a little, back away from the tanker and continue
your intended flight.

Successfully refueling is not easy and can take a lot of practise, as in real
life. Here are some helpful hints for making contact.

\begin{enumerate}
\item Approach the tanker slowly. It is very easy to overshoot and be unable to
spot where the tanker has gone.
\item If you are having difficulty matching the speed of the tanker due to the
throttle being too sensitive, try deploying your airbrakes. This will require
more power to achieve the same speed and will reduce the throttle sensitivity.
\item To reduce your workload, you may be able to use the autpilot to stay at
the correct altitude and/or speed. This is technically cheating, though NASA
recently demonstrated that an advanced autopilot can perform AAR without pilot
intervention.
\item Bear in mind that as you receive fuel your aircraft will become heavier
and the center of gravity will move, affecting the trim of the aircraft.
\item The tanker aircraft fly a clock-wise "race-track" pattern in the sky.
While it is possible to stay connected during these turns, you may find it
easier to wait until the tanker has settled on its new course before refueling.
The tanker aircraft provide warnings when they are intending to turn.
\end{enumerate}

\subsection{Multiplayer Refueling}

Refuelling is possible within a Multiplayer session using the KC135 or Victor.
The pilot of this aircraft should use the callsign "MOBIL1", "MOBIL2" or "MOBIL3".
Other numbers are acceptable, but only these three have A-A TACAN
channels assigned.  These are 060X, 061X and 062X respectively.

If the receiving aircraft uses a YASim FDM, there are no further
complications.  Should the receiving aircraft be JSBSim based, the user
must make sure that there are no AI tankers in their configuration.
This means disabling (commenting out) all refuelling "scenarios" in the
relevant aircraft-set.xml and in preferences.xml.

MP refuelling works in exactly the same way as AI refuelling and is a
fun challenge.  It is best to ensure that your network connection is as
free from interruptions as possible; the MP code does a degree of
prediction if there is a "blip" in the stream of packets and this can
make close formation flight very difficult or even impossible.
\translatorEnd
